/***************************************************************************
 *   Copyleft 2006-2007 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#include "./XAxis.h"

XAxis::XAxis(cFloat fLength): Object3D(4, 3) {
	mVertexTable[0] = Point4D();
	cFloat fA = fLength - fLength * 0.2f;
	cFloat fB = fLength * 0.05f;
	mVertexTable[1] = Point4D(fA, -fB, 0.0f);
	mVertexTable[2] = Point4D(fA, fB, 0.0f);
	mVertexTable[3] = Point4D(fLength, 0.0f, 0.0f);


	//					   \
	//						\
	//
	mEdgeTable[1].mBegin = 1;
	mEdgeTable[1].mEnd = 3;

	// ------------------------
	mEdgeTable[0].mBegin = 0;
	mEdgeTable[0].mEnd = 3;

	//						/
	//					   /
	mEdgeTable[2].mBegin = 2;
	mEdgeTable[2].mEnd = 3;

	mColor = Color::ToWinColor(RED);
}

/*virtual*/ cChar* XAxis::GetName() {
	return "X-Axis";
}